import requests
import re

class LagouSpider:
    def __init__(self):
        # 接口url
        self.url = 'https://www.lagou.com/jobs/positionAjax.json?needAddtionalResult=false'
        self.data = dict(first='true', pn='1', kd='python')
        print(self.data)
        

    def run(self):
        response = requests.post(self.url, data=self.data)
        print(response.json())


if __name__ == '__main__':
    spider = LagouSpider()
    spider.run()

